package com.cn.serverline.lineicp.workshopPlan.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * @author pty
 * @title RolingPlanException
 * @date 2023/11/21
 * @description 文件导入异常枚举
 */
@Getter
public enum RolingPlanException implements AbstractExceptionEnum {

    FILE_UPLOAD(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "01","文件解析异常:文件内容为空"),
    TEMPLATE_FILE(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "01","请按照模板文件进行导入"),
    FILE_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "23","文件为空"),

    MODEL_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "02","请填写产品型号!"),

    UNMATCHED_MODEL(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "02","存在未匹配的类型状态请从新输入!"),

    NOT_NEXT_MONTH(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "02","你导入的文件中,包含不是本月或t月的日期,请更新后再进行导入"),

    NOT_NEXT_ONE_MONTH(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "02","你导入的文件中,包含不是t+1月的日期,请更新后再进行导入"),

    MATCHING_FAILED(RuleConstants.BUSINESS_ERROR_TYPE_CODE +  "03","该产品型号在工艺中匹配不到对应数据,请添加对应工艺数据或修改后再进行导入"),

    SECTION_MATCHING(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"04","工段匹配失败,请填写正确的型号前缀,再进行导入"),

    DEFAULT_NODE(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"05","默认节点不能删除"),

    CALCULATION_RANGE(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"06","计算已经超出了本年或本月的范围,请更正在进行计算"),

    NAME_EXISTS(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"07","名称重复!"),

    PROD_NOT_NULL(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"08","产线构型ID不能为空"),

    ID_NOT_NULL(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"09","ID不能为空"),

    CHOICE_DATA(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"10","请选择数据"),

    SUBMITTED(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"11","工艺记录已提交,请勿重复提交!"),

    MONTH_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"12","T月份为空,请填写在导入"),

    NUMBER_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"13","T交付数量或交付日期为空"),

    WORKING_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"14","工作制为空"),

    DATE_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"15","交付日期格式错误"),

    DATE_T_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"15","T月份日期格式错误"),

    CALL_EXCEPTION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"16","调用异常,请重试"),

    QUANTITY_OR_DELIVERY_DATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"17","T+1中数量或交付日期为空"),

    CATEGORY_TYPE(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"18","计划类别必须为A或0"),

    NO_WORKSHOP_IS_CONFIGURED(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"19","未配置工段,请先配置再查看"),

    NOT_CONFIGURED_SECTION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"19","存在未配置工段的数据,请先配置在下发。"),

    NOT_CONFIGURED_TEAM(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"19","t月未配置班组,请先配置在下发。"),

    T_ADD_ONE_NOT_CONFIGURED_TEAM(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"19","t+1月未配置班组,请先配置在下发。"),

    NO_MATERIAL_INFORMATION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"20","该产品型号的总装或部装,找不到对应物料信息"),

    ISSUED_IN_T_MONTH(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"21","T月日期填写不规范,请重新填写后,再次导入"),

    ISSUED_IN_T_ADD_ONE_MONTH(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"21","T+1月日期填写不规范,请重新填写后,再次导入"),

    T_MONTH_DATE_SPECIFICATION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"22","存在不是T月日期的数据"),

    T_ADD_ONE_MONTH_DATE_SPECIFICATION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"22","存在不是T+1月日期的数据"),

    PLAN_NOT_ISSUED(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"23","该计划还未下发,无法进行撤回操作"),

    PLAN_YES_ISSUED(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"24","该计划已下发,无法进行撤回操作"),

    PLAN_YES_ISSUED_WEEKLY_PLAN(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"25","该计划已下发周计划,无法进行撤回操作"),

    SCHEDULING_PLAN_CANNOT_WITHDRAW(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"26","当前排产计划,已在生产执行进行操作,无法进行撤回操作"),

    SCHEDULING_PLAN_NOT_ISSUED_CANNOT_WITHDRAW(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"26","当前排产计划未下发,无法进行撤回操作"),
    PRODUCTION_EXECUTION_OPERATION_CANNOT_WITHDRAW(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"26","当前排产计划,已在物料已经进行操作,无法进行撤回操作"),

    BATCH_SPLIT_CANNOT_WITHDRAW(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"27","当前计划的拆分批次,已在物料已经进行操作,无法进行撤回操作"),
    BATCH_NOT_SPLIT_CANNOT_WITHDRAW(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"27","当前计划批次未拆分,无法进行撤回操作"),

    WEEKLY_PLAN_NOT_ISSUED(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"28","未下发周计划"),

    ISSUE_WEEKLY_PLAN_CALL_MATERIAL(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"28","请先下发周计划,在叫料"),

    UNCONFIGURED_SECTION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"29","请先在字典配置对应工段类型"),

    PROCESS_WORKING_HOURS_NOT_SET(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"30","工艺工序的工时未配置,请在工艺中配置时间_no"),

    SELECT_EXCEPTION_DETAILS(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"31","请选择异常详情"),

    CURING_TIME_IS_EMPTY(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"32","请添加固化时间"),

    NOT_CORRECT_CONFIGURATION(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"33","存在检验工序,请正确配置构型_no"),

    ZERO(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"34","未找到这条数据"),

    ONE(RuleConstants.BUSINESS_ERROR_TYPE_CODE+"35","编号已存在"),

    ;



    /**
     * 错误编码
     */
    private final String errorCode;

    /**
     * 提示用户信息
     */
    private final String userTip;

    RolingPlanException(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }
}
